テンプレート・トーク:Tooltip
Documentation The template creates a WoW styled tooltip for items; you can supply any number of the named parameters to display specific text in the tooltip. Required Minimal Syntax Begin all item-page tooltips with the following three lines: } |mode= } |arg= } All item-page tooltips should end with the following line: }} The template parameters displayed here are required to enable item pages interact with other consumers of tooltip data, and do not change from page to page. Named parameters Display modes Passing |mode= to the template (and, by extension to the item page syntax, any item page) affects how the template renders the tooltip. There are several valid mode values: ;home / away :Displays the tooltip as if on its item page (home) or not on its item page (away). If mode is omitted, the appropriate one of those is chosen by default. ;link / imlink :Return an item link (link) or an item link with an image (imlink) instead of the tooltip. ;arg (in combination with |arg=) :Returns the value of }|--}}}, evaluated in the tooltip's context. "type" and "slot" values List of values that appear in tooltips. ; type :Arrow, Axe, Bow, Bullet, Cloth, Crossbow, Dagger, Fishing Pole, Fist Weapon, Gun, Idol, Leather, Libram, Mace, Mail, Plate, Polearm, Shield, Staff, Sword, Thrown, Totem, Wand. ; slot :Back, Chest, Feet, Finger, Hands, Head, Held In Off-hand, Legs, Main Hand, Neck, Off Hand, One-Hand, Projectile, Ranged, Relic, Shirt, Shoulder, Tabard, Thrown, Trinket, Two-Hand, Waist, Wrist. List of Archived Talk discussions * Template talk:Tooltip/Archive01: Up to and including June 2007. * Template talk:Tooltip/Archive02: Up to and including May 2008. Arena rating What's the option for: "Requires personal and team arena rating of XXXX"? :Abuse |req= for now, I think. -- foxlit (talk) 20:53, 11 June 2008 (UTC) ::Made it |rating=. Just give it a number value and it'll print the rest. 22:01, 12 July 2008 (UTC) Double-quotes in name messing with float/font I saw this problem with . Apparently using " instead of "-mark works. -- Fandyllic (talk · ) 9:48 AM PST 23 Jun 2008 Cooldown format There should be a standard format for the Cooldown= entry, perhaps a template like cost. I've seen Cooldown= nn min and Cooldown= nn minutes. I think both work because they are transposed as text, there is no interpretation, but standardizing would be better. Madkaugh (talk) 21:20, 8 September 2008 (UTC) Non PNG File Extensions Seems in past discussions this was brought up, but still appears to be unresolved. For example, if you take an icon from wowhead, you'll have to convert it from JPG to PNG, yet the file uploader will take many non-PNG formats. It seems like such a popular template should be congruent with the upload feature. Howbizr (talk) 02:51, 21 September 2008 (UTC) :We intentionally use .png for all of our in-game icons because it makes the rest of our templates/page-creation bots that use wow icons a lot easier to deal with. :The file uploader takes all kinds of images because we use more than just WoW icons... --k_d 05:38, 21 September 2008 (UTC) Achievement Tooltip Ideas Shafted! Shoot 10 players with the . Criteria: - 10x Silver Shafted Arrow. Fool For Love Complete the Love is in the Air achievements listed below. Criteria: Heartmender Shafted! Flirt with Disaster Lonely? Nearest and Dearest The Rockets Pink Glare Nation of Adoration Fistfull of Love Perma-Peddle Sweet Tooth Be Mine My Love is Like a Red, Red Rose I Pitied the Fool Rewards: *Title Reward: I had some ideas. Just wanted to share, if you want to adopt into the stylesheet / template. Here's an example of a regular achievement, as well as an achievement made up of other achievements. -Howbizr (talk) 20:04, 21 October 2008 (UTC) :This should be made into a new template if created at all. This template is strictly for items. -- 20:08, 21 October 2008 (UTC) Best current practice for usage I notice that there's some inconsistency between common usage, the example at the top of this page, and the boilerplate. On this page, we have: } |mode= } |arg= } has: } |arg= } ... }} The boilerplate definitely needs some tweaking so that it works more reasonably with subst (currently the onlyinclude wrapper and standard setup for mode and arg are lost in the subst). The item pages have a mixture of styles, a few of them are even missing onlyinclude/noinclude, causing breakage when used with, e.g. . Some use noinclude around the rest of the page, some wrap the tooltip with onlyinclude. I reckon onlyinclude is the better style, as it's less prone to someone less experienced incorrectly putting something outside the noinclude block. But what about }. I can see the utility of the latter, allowing an alternate template to be used when transcluding the page. Is that meant to be the standard, and should we be changing the existing articles to that standard? I've got all the necessary framework and regexps available with MurphBot, from standardising and fixing the usage, and it is very easy to adapt that to that to this template (although I do realise the scale of usage is significantly larger). Would it be desirable to have a bot standardise the usage to best practice (ensuring there's an onlyinclude wrapper, removing old noinclude wrappers, and ensuring that the required minimum parameters are present in standard form)? If so, does the following represent our desired standard usage? } |mode= } |arg= } ... }} -- 11:46, 24 December 2008 (UTC) :What I've understood so far is that } is for Foxbot to easily change the tooltips. The has mostly been used in tooltips from older items. I don't believe that newer items has been using noinclude. is what should be used. :On using bots to eliminate noinclude in favor of onlyinclude: I think that's very hard to do since there's articles that aren't items but use noinclude anyway. I'd let someone who knows more about bot editing to comment on that, thoug. 12:07, 24 December 2008 (UTC) ::Thanks. As far as restricting the elimination of noinclude to item pages, that's easy enough, as long as it is sufficient to restrict it to pages which actually include usage of (and not pages which transclude pages which have the template). The python regexps which should achieve that are: :: '(?msi)(?<= })(.*?)' -> '\1' :: '(?msi)(?=.* })' -> '' ::Are there any examples of pages which are not items, but do have in them? ::And not wanting to produce a controversial tangent here (if it's to be discussed, somewhere else would be more appropriate), but this is something that would be made more certain (ensuring that you're only processing items) if the items were in their own namespace or pseudo-namespace. ::-- 12:31, 24 December 2008 (UTC)